import java.util.Scanner;//类似于C语言的include

/**
 * \* Created with IntelliJ IDEA.
 * \* User: Administrator
 * \* Date: 2021/10/16
 * \* Time: 14:27
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
public class TestDemo {

    public static void main(String[] args) {
        for(;;){
            System.out.println("fafafafa");
        }
    }

    public static void main10(String[] args) {
        //找到1-100之间，能被3整除，也能被5整除的数字
        int i=0;
        for(i=0;i<100;i++){
            if(i%3==0&&i%5==0){
                System.out.println(i);
                continue;
            }
        }
    }

    public static void main9(String[] args) {
        int i=1;
        while(i<=10){
            while(i<=10){
                if(i%3==0){
                    System.out.println(i);
                    break;
                }
                i++;
            }
        }
    }

    public static void main8(String[] args) {
        int i=10;
        int j=10;
        while (i>0)
            System.out.println("abcd");
            while (j>0)
                System.out.println("1234");
        System.out.println("12345");
        System.out.println("123456");
    }

    public static void main7(String[] args) {
        /*
        * n!
        * */
        int j=1;
        int sum=0;
        while (j<=5)
        {
            //int n=5;
            int i=1;
            int ret=1;
            while (i<=j){
                ret*=i;
                i++;
            }
           sum+=ret;
            j++;
        }
        System.out.println(sum);
    }

    public static void main6(String[] args) {
        int n=5;
        int i=1;
        int ret=1;
        while (i<=n){
            ret*=i;
            i++;
        }
        System.out.println(ret);
    }


    //面试问题，Java当中，不能做Switch参数的数据类型有哪些

    public static void main5(String[] args) {
        int a =10;
        switch(a){
            case 1:
                System.out.println(1);
                break;
            case 2:
                System.out.println(2);
                break;
            default:
                System.out.println("参数不匹配");
                break;

        }
    }


    public static void main4(String[] args) {
        int year=2000;
        if(year%100==0){
            if(year%400==0){
                System.out.println(year+"是闰年");
            }else{
                System.out.println(year+"不是闰年");
            }
        }else{
            if(year%4==0){
                System.out.println(year+"是闰年");
            }else{
                System.out.println(year+"不是闰年");
            }
        }
    }


    public static void main3(String[] args) {
        int year=2000;
        if(year%100==0){
            if(year%400==0){
                System.out.println(year+"是闰年");
            }else{
                System.out.println(year+"不是闰年");
            }
        }else{
            if(year%4==0){
                System.out.println(year+"是闰年");
            }else{
                System.out.println(year+"不是闰年");
            }
        }
    }

    public static void main2(String[] args) {
        Scanner scanner=new Scanner(System.in);
       // String str1=scanner.nextLine();//遇到空格不会结束
        String str=scanner.next();//读入一个字符串,遇到空格就会读取结束
        System.out.println(str);
        int n=scanner.nextInt();//读入一个数
        if(n%2==0)//这个框框表示警告，不一定有错误
        {
            System.out.println("偶数");
        }else{
            System.out.println("奇数");
        }
    }


    public static void main1(String[] args) {
        //程序的执行跟代码的顺序有关
        System.out.println(1);
        System.out.println(2);
        System.out.println(3);
        System.out.println(4);
    }
}
